<!DOCTYPE html>
<html lang="en">
<head>
    <title>囧么肥事</title>
    <meta charset="UTF-8"/>
    <meta name="viewport"
          content="width=device-width,height=device-height,initial-scale=1.0,maximum-scale=1.0,user-scalable=0"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="Content-Type" content="text/html;"/>
    <meta name="renderer" content="webkit">
    <!--解决页面加载网络图片的403问题 , 可以让img标签预加载网络图片-->
    <meta name="referrer" content="no-referrer" />

    <!--markdown S -->
    <link rel="stylesheet" type="text/css" href="../../static/css/export_setting_css.css"/>
    <link rel="stylesheet" type="text/css" href="../../static/css/markdown_preview_css.css"/>
    <!--markdown E -->

    <!--left bar tools css E-->
    <link rel="stylesheet" type="text/css" href="../../static/css/nav.css">
    <link rel="stylesheet" type="text/css" href="http://www.jq22.com/jquery/font-awesome.4.6.0.css">
    <!--left bar tools css E-->

    <!-- 滚动条 S -->
    <link rel="stylesheet" href="../../static/css/optiscroll.css">
    <!-- 滚动条 E -->
</head>
<body>
<div id="m-wrapper" class="m-wrapper optiscroll">
    <!-- top 锚点 -->
    <a id="top"></a>

    <!-- left bar tools S -->
    <div class="leftNav-item">
        <ul>
            <li>
                <i class="fa fa-location-arrow"></i>
                <a href="http://jiongmefeishi.gitee.io/monster-blog/" target="_blank" class="rota">个人网站</a>
            </li>

            <li title="Git">
                <i class="fa fa-code-fork" aria-hidden="true"></i>
                <a href="http://jiongmefeishi.gitee.io/monster-blog/" target="_blank" class="rota">Git Page</a>
            </li>

            <li lay-data="img" data-fooc="http://resource.zqtaotao.cn/wx/qrcode/jiongmefeishi.jpg">
                <i class="fa fa-comments-o"></i><a href="javascript:;" class="rota">公众号</a>
            </li>

            <li lay-data="img" data-fooc="http://resource.zqtaotao.cn/weixincode.png">
                <i class="fa fa-money"></i><a href="javascript:;" class="rota">小额打赏</a>
            </li>
            <li title="返回顶部" class="for-top">
                <i class="fa fa-arrow-up"></i>
                <a href="#top" class="rota">去顶部</a>
            </li>
        </ul>
    </div>
    <!-- left bar tools E -->

    <!--content S-->
    <div id="export_content"><div class="output_wrapper" id="output_wrapper_id"><h3 id="hifelse"><span>《设计模式实践》策略和工厂模式替代业务场景中复杂的ifelse</span></h3>
        <figure><img src="https://mmbiz.qpic.cn/mmbiz_png/2GfhQ2H7oTEAjuuGFQ7uyWswjNib3Tf49vcibeQS8MNosqf9JH5NoxyaDaYuZeMZKPiaD9Ks1JWgWk9aHwadycZlA/640?wx_fmt=png&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" alt="." title="."><figcaption>.</figcaption></figure>
        <p>我是肥哥，一名不专业的面试官！</p>
        <p>我是囧囧，一名积极找工作的小菜鸟！</p>
        <blockquote>
            <p><strong>囧囧表示：小白面试最怕的就是面试官问的知识点太笼统，自己无法快速定位到关键问题点！！！</strong></p>
        </blockquote>
        <hr>
        <p><strong>本期主要面试考点</strong></p>
        <pre><code class="hljs">面试官考点之如何用设计模式替换业务场景中复杂的ifelse？<br></code></pre>
        <hr>
        <figure><img src="https://mmbiz.qpic.cn/mmbiz_jpg/2GfhQ2H7oTGPZ97KQVxqRqsSwE0avysNib9icQJpTkPfA7HxqDCibdPuumJUtLhk5bUEEFpzp3AoqT5uonrgtdaBA/640?wx_fmt=jpeg&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" alt="." title="."><figcaption>.</figcaption></figure>
        <figure><img src="https://mmbiz.qpic.cn/mmbiz_jpg/2GfhQ2H7oTGPZ97KQVxqRqsSwE0avysNb13eFOibGWLYFzNGebd35VGVm2fGMyCMTTG2ocDxsx5qyBGXDpqJf3A/640?wx_fmt=jpeg&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" alt="." title="."><figcaption>.</figcaption></figure>
        <p><strong>VIP类型</strong></p>
        <pre><code class="hljs java"><span class="hljs-keyword">import</span>&nbsp;java.util.Objects;<br><br><span class="hljs-comment">/**<br>&nbsp;*&nbsp;<span class="hljs-doctag">@author</span>:&nbsp;欢迎关注喂信公猪号：囧么肥事<br>&nbsp;*&nbsp;<span class="hljs-doctag">@date</span>:&nbsp;2021/12/16<br>&nbsp;*&nbsp;<span class="hljs-doctag">@email</span>:&nbsp;jiongmefeishi@163.com<br>&nbsp;*<br>&nbsp;*&nbsp;会员类型<br>&nbsp;*/</span><br><span class="hljs-keyword">public</span>&nbsp;<span class="hljs-keyword">enum</span>&nbsp;VIPEnums&nbsp;{<br><br>&nbsp;&nbsp;&nbsp;&nbsp;GOLD(<span class="hljs-number">1</span>,&nbsp;<span class="hljs-string">"黄金会员"</span>),<br>&nbsp;&nbsp;&nbsp;&nbsp;STAR(<span class="hljs-number">2</span>,&nbsp;<span class="hljs-string">"星钻会员"</span>),<br>&nbsp;&nbsp;&nbsp;&nbsp;SPORTS(<span class="hljs-number">3</span>,&nbsp;<span class="hljs-string">"体育会员"</span>),<br>&nbsp;&nbsp;&nbsp;&nbsp;FUN_VIP(<span class="hljs-number">4</span>,&nbsp;<span class="hljs-string">"FUN会员"</span>);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-keyword">private</span>&nbsp;<span class="hljs-keyword">final</span>&nbsp;<span class="hljs-keyword">int</span>&nbsp;code;<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-keyword">private</span>&nbsp;<span class="hljs-keyword">final</span>&nbsp;String&nbsp;desc;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;VIPEnums(<span class="hljs-keyword">int</span>&nbsp;code,&nbsp;String&nbsp;desc)&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-keyword">this</span>.code&nbsp;=&nbsp;code;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-keyword">this</span>.desc&nbsp;=&nbsp;desc;<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-function"><span class="hljs-keyword">public</span>&nbsp;<span class="hljs-keyword">int</span>&nbsp;<span class="hljs-title">getCode</span><span class="hljs-params">()</span>&nbsp;</span>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-keyword">return</span>&nbsp;code;<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-function"><span class="hljs-keyword">public</span>&nbsp;String&nbsp;<span class="hljs-title">getDesc</span><span class="hljs-params">()</span>&nbsp;</span>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-keyword">return</span>&nbsp;desc;<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-function"><span class="hljs-keyword">public</span>&nbsp;<span class="hljs-keyword">static</span>&nbsp;VIPEnums&nbsp;<span class="hljs-title">getByCode</span><span class="hljs-params">(Integer&nbsp;code)</span>&nbsp;</span>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-keyword">for</span>&nbsp;(VIPEnums&nbsp;s&nbsp;:&nbsp;VIPEnums.values())&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-keyword">if</span>&nbsp;(Objects.equals(s.getCode(),&nbsp;code))&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-keyword">return</span>&nbsp;s;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-keyword">return</span>&nbsp;<span class="hljs-keyword">null</span>;<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br>}<br></code></pre>
        <p><strong>VIP实体</strong></p>
        <pre><code class="hljs java"><span class="hljs-comment">/**<br>&nbsp;*&nbsp;<span class="hljs-doctag">@author</span>:&nbsp;欢迎关注喂信公猪号：囧么肥事<br>&nbsp;*&nbsp;<span class="hljs-doctag">@date</span>:&nbsp;2021/12/16<br>&nbsp;*&nbsp;<span class="hljs-doctag">@email</span>:&nbsp;jiongmeifeishi@163.com<br>&nbsp;*<br>&nbsp;*&nbsp;vip<br>&nbsp;*/</span><br><span class="hljs-keyword">public</span>&nbsp;<span class="hljs-class"><span class="hljs-keyword">class</span>&nbsp;<span class="hljs-title">VIP</span>&nbsp;</span>{<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-keyword">private</span>&nbsp;VIPEnums&nbsp;vipType;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-comment">//&nbsp;TODO&nbsp;VIP&nbsp;其他属性&nbsp;id,&nbsp;name&nbsp;...</span><br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-function"><span class="hljs-keyword">public</span>&nbsp;<span class="hljs-title">VIP</span><span class="hljs-params">()</span>&nbsp;</span>{<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-function"><span class="hljs-keyword">public</span>&nbsp;<span class="hljs-title">VIP</span><span class="hljs-params">(VIPEnums&nbsp;vipType)</span>&nbsp;</span>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-keyword">this</span>.vipType&nbsp;=&nbsp;vipType;<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-function"><span class="hljs-keyword">public</span>&nbsp;VIPEnums&nbsp;<span class="hljs-title">getVipType</span><span class="hljs-params">()</span>&nbsp;</span>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-keyword">return</span>&nbsp;vipType;<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-function"><span class="hljs-keyword">public</span>&nbsp;<span class="hljs-keyword">void</span>&nbsp;<span class="hljs-title">setVipType</span><span class="hljs-params">(VIPEnums&nbsp;vipType)</span>&nbsp;</span>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-keyword">this</span>.vipType&nbsp;=&nbsp;vipType;<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br>}<br></code></pre>
        <p><strong>if-else 模式</strong></p>
        <pre><code class="hljs cpp"><span class="hljs-comment">//&nbsp;if-else&nbsp;模式</span><br><span class="hljs-keyword">public</span>&nbsp;<span class="hljs-class"><span class="hljs-keyword">class</span>&nbsp;<span class="hljs-title">App</span>&nbsp;{</span><br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-function"><span class="hljs-keyword">public</span>&nbsp;<span class="hljs-keyword">static</span>&nbsp;<span class="hljs-keyword">void</span>&nbsp;<span class="hljs-title">main</span><span class="hljs-params">(&nbsp;String[]&nbsp;args&nbsp;)</span>&nbsp;</span>{<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-comment">//&nbsp;黄金会员</span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VIP&nbsp;vip&nbsp;=&nbsp;<span class="hljs-keyword">new</span>&nbsp;VIP(VIPEnums.GOLD);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-keyword">if</span>&nbsp;(vip.getVipType().getCode()&nbsp;==&nbsp;VIPEnums.GOLD.getCode())&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-comment">//&nbsp;TODO&nbsp;黄金会员权益</span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;<span class="hljs-keyword">else</span>&nbsp;<span class="hljs-keyword">if</span>&nbsp;(vip.getVipType().getCode()&nbsp;==&nbsp;VIPEnums.STAR.getCode())&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-comment">//&nbsp;TODO&nbsp;星钻会员权益</span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;<span class="hljs-keyword">else</span>&nbsp;<span class="hljs-keyword">if</span>&nbsp;(vip.getVipType().getCode()&nbsp;==&nbsp;VIPEnums.SPORTS.getCode())&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-comment">//&nbsp;TODO&nbsp;体育会员权益</span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;<span class="hljs-keyword">else</span>&nbsp;<span class="hljs-keyword">if</span>&nbsp;(vip.getVipType().getCode()&nbsp;==&nbsp;VIPEnums.FUN_VIP.getCode())&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-comment">//&nbsp;TODO&nbsp;FUN会员权益</span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;<span class="hljs-keyword">else</span>&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-comment">//&nbsp;TODO&nbsp;其他会员...</span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br><br>&nbsp;&nbsp;&nbsp;&nbsp;}<br>}<br></code></pre>
        <h3 id="h"><span>策略模式</span></h3>
        <p><strong>VIP策略接口</strong></p>
        <pre><code class="hljs java"><span class="hljs-comment">/**<br>&nbsp;*&nbsp;<span class="hljs-doctag">@author</span>:&nbsp;欢迎关注喂信公猪号：囧么肥事<br>&nbsp;*&nbsp;<span class="hljs-doctag">@date</span>:&nbsp;2021/12/16<br>&nbsp;*&nbsp;<span class="hljs-doctag">@email</span>:&nbsp;jiongmefeishi@163.com<br>&nbsp;*&nbsp;VIP&nbsp;策略接口<br>&nbsp;*/</span><br><span class="hljs-keyword">public</span>&nbsp;<span class="hljs-class"><span class="hljs-keyword">interface</span>&nbsp;<span class="hljs-title">VIPStrategy</span>&nbsp;</span>{<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-comment">//&nbsp;VIP&nbsp;具备的权益</span><br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-function"><span class="hljs-keyword">void</span>&nbsp;<span class="hljs-title">equity</span><span class="hljs-params">()</span></span>;<br>}<br></code></pre>
        <p><strong>策略接口具体实现类-黄金会员</strong></p>
        <pre><code class="hljs java"><span class="hljs-comment">/**<br>&nbsp;*&nbsp;<span class="hljs-doctag">@author</span>:&nbsp;欢迎关注喂信公猪号：囧么肥事<br>&nbsp;*&nbsp;<span class="hljs-doctag">@date</span>:&nbsp;2021/12/16<br>&nbsp;*&nbsp;<span class="hljs-doctag">@email</span>:&nbsp;jiongmefeishi@163.com<br>&nbsp;*<br>&nbsp;*&nbsp;策略接口具体实现类-黄金会员<br>&nbsp;*/</span><br><span class="hljs-keyword">public</span>&nbsp;<span class="hljs-class"><span class="hljs-keyword">class</span>&nbsp;<span class="hljs-title">GoldVIPStrategyImpl</span>&nbsp;<span class="hljs-keyword">implements</span>&nbsp;<span class="hljs-title">VIPStrategy</span>&nbsp;</span>{<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-meta">@Override</span><br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-function"><span class="hljs-keyword">public</span>&nbsp;<span class="hljs-keyword">void</span>&nbsp;<span class="hljs-title">equity</span><span class="hljs-params">()</span>&nbsp;</span>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-comment">//&nbsp;TODO&nbsp;黄金会员具备的具体权益</span><br>&nbsp;&nbsp;&nbsp;&nbsp;}<br>}<br></code></pre>
        <p><strong>策略接口具体实现类-星钻会员</strong></p>
        <pre><code class="hljs java"><span class="hljs-comment">/**<br>&nbsp;*&nbsp;<span class="hljs-doctag">@author</span>:&nbsp;欢迎关注喂信公猪号：囧么肥事<br>&nbsp;*&nbsp;<span class="hljs-doctag">@date</span>:&nbsp;2021/12/16<br>&nbsp;*&nbsp;<span class="hljs-doctag">@email</span>:&nbsp;jiongmefeishi@163.com<br>&nbsp;*<br>&nbsp;*&nbsp;策略接口具体实现类-星钻会员<br>&nbsp;*/</span><br><span class="hljs-keyword">public</span>&nbsp;<span class="hljs-class"><span class="hljs-keyword">class</span>&nbsp;<span class="hljs-title">StarVIPStrategyImpl</span>&nbsp;<span class="hljs-keyword">implements</span>&nbsp;<span class="hljs-title">VIPStrategy</span>&nbsp;</span>{<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-meta">@Override</span><br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-function"><span class="hljs-keyword">public</span>&nbsp;<span class="hljs-keyword">void</span>&nbsp;<span class="hljs-title">equity</span><span class="hljs-params">()</span>&nbsp;</span>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-comment">//&nbsp;TODO&nbsp;星钻会员具备的具体权益</span><br>&nbsp;&nbsp;&nbsp;&nbsp;}<br>}<br></code></pre>
        <p><strong>策略接口具体实现类-体育会员</strong></p>
        <pre><code class="hljs java"><span class="hljs-comment">/**<br>&nbsp;*&nbsp;<span class="hljs-doctag">@author</span>:&nbsp;欢迎关注喂信公猪号：囧么肥事<br>&nbsp;*&nbsp;<span class="hljs-doctag">@date</span>:&nbsp;2021/12/16<br>&nbsp;*&nbsp;<span class="hljs-doctag">@email</span>:&nbsp;jiongmefeishi@163.com<br>&nbsp;*<br>&nbsp;*&nbsp;策略接口具体实现类-体育会员<br>&nbsp;*/</span><br><span class="hljs-keyword">public</span>&nbsp;<span class="hljs-class"><span class="hljs-keyword">class</span>&nbsp;<span class="hljs-title">SportsVIPStrategyImpl</span>&nbsp;<span class="hljs-keyword">implements</span>&nbsp;<span class="hljs-title">VIPStrategy</span>&nbsp;</span>{<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-meta">@Override</span><br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-function"><span class="hljs-keyword">public</span>&nbsp;<span class="hljs-keyword">void</span>&nbsp;<span class="hljs-title">equity</span><span class="hljs-params">()</span>&nbsp;</span>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-comment">//&nbsp;TODO&nbsp;体育会员具备的具体权益</span><br>&nbsp;&nbsp;&nbsp;&nbsp;}<br>}<br></code></pre>
        <p><strong>策略接口具体实现类-FUN会员</strong></p>
        <pre><code class="hljs java"><span class="hljs-comment">/**<br>&nbsp;*&nbsp;<span class="hljs-doctag">@author</span>:&nbsp;欢迎关注喂信公猪号：囧么肥事<br>&nbsp;*&nbsp;<span class="hljs-doctag">@date</span>:&nbsp;2021/12/16<br>&nbsp;*&nbsp;<span class="hljs-doctag">@email</span>:&nbsp;jiongmefeishi@163.com<br>&nbsp;*<br>&nbsp;*&nbsp;策略接口具体实现类-FUN会员<br>&nbsp;*/</span><br><span class="hljs-keyword">public</span>&nbsp;<span class="hljs-class"><span class="hljs-keyword">class</span>&nbsp;<span class="hljs-title">FunVIPStrategyImpl</span>&nbsp;<span class="hljs-keyword">implements</span>&nbsp;<span class="hljs-title">VIPStrategy</span>&nbsp;</span>{<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-meta">@Override</span><br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-function"><span class="hljs-keyword">public</span>&nbsp;<span class="hljs-keyword">void</span>&nbsp;<span class="hljs-title">equity</span><span class="hljs-params">()</span>&nbsp;</span>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-comment">//&nbsp;TODO&nbsp;FUN会员具备的具体权益</span><br>&nbsp;&nbsp;&nbsp;&nbsp;}<br>}<br></code></pre>
        <p><strong>策略上下文类</strong></p>
        <pre><code class="hljs java"><span class="hljs-comment">/**<br>&nbsp;*&nbsp;<span class="hljs-doctag">@author</span>:&nbsp;欢迎关注喂信公猪号：囧么肥事<br>&nbsp;*&nbsp;<span class="hljs-doctag">@date</span>:&nbsp;2021/12/16<br>&nbsp;*&nbsp;<span class="hljs-doctag">@email</span>:&nbsp;jiongmefeishi@163.com<br>&nbsp;*<br>&nbsp;*&nbsp;策略上下文类(&nbsp;vip&nbsp;策略接口的持有者)<br>&nbsp;*/</span><br><span class="hljs-keyword">public</span>&nbsp;<span class="hljs-class"><span class="hljs-keyword">class</span>&nbsp;<span class="hljs-title">VIPStrategyContext</span>&nbsp;</span>{<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-keyword">private</span>&nbsp;VIPStrategy&nbsp;vipStrategy;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-comment">//&nbsp;设置VIP策略</span><br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-function"><span class="hljs-keyword">public</span>&nbsp;<span class="hljs-keyword">void</span>&nbsp;<span class="hljs-title">setVipStrategy</span><span class="hljs-params">(VIPStrategy&nbsp;vipStrategy)</span>&nbsp;</span>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-keyword">this</span>.vipStrategy&nbsp;=&nbsp;vipStrategy;<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-comment">//&nbsp;执行&nbsp;VIP&nbsp;权益</span><br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-function"><span class="hljs-keyword">public</span>&nbsp;<span class="hljs-keyword">void</span>&nbsp;<span class="hljs-title">handle</span><span class="hljs-params">()</span>&nbsp;</span>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-keyword">if</span>&nbsp;(vipStrategy&nbsp;!=&nbsp;<span class="hljs-keyword">null</span>)&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vipStrategy.equity();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br>}<br></code></pre>
        <p><strong>策略工厂</strong></p>
        <pre><code class="hljs java"><span class="hljs-comment">/**<br>&nbsp;*&nbsp;<span class="hljs-doctag">@author</span>:&nbsp;欢迎关注喂信公猪号：囧么肥事<br>&nbsp;*&nbsp;<span class="hljs-doctag">@date</span>:&nbsp;2021/12/16<br>&nbsp;*&nbsp;<span class="hljs-doctag">@email</span>:&nbsp;jiongmefeishi@163.com<br>&nbsp;*<br>&nbsp;*&nbsp;VIP策略工厂<br>&nbsp;*/</span><br><span class="hljs-keyword">public</span>&nbsp;<span class="hljs-class"><span class="hljs-keyword">class</span>&nbsp;<span class="hljs-title">VIPStrategyFactory</span>&nbsp;</span>{<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-function"><span class="hljs-keyword">private</span>&nbsp;<span class="hljs-title">VIPStrategyFactory</span><span class="hljs-params">()</span>&nbsp;</span>{<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-function"><span class="hljs-keyword">public</span>&nbsp;<span class="hljs-keyword">static</span>&nbsp;VIPStrategy&nbsp;<span class="hljs-title">getVipStrategy</span><span class="hljs-params">(VIP&nbsp;vip)</span>&nbsp;</span>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VIPStrategy&nbsp;vipStrategy&nbsp;=&nbsp;<span class="hljs-keyword">null</span>;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-keyword">if</span>&nbsp;(vip.getVipType().getCode()&nbsp;==&nbsp;VIPEnums.GOLD.getCode())&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-comment">//&nbsp;黄金会员策略实现类</span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vipStrategy&nbsp;=&nbsp;<span class="hljs-keyword">new</span>&nbsp;GoldVIPStrategyImpl();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;<span class="hljs-keyword">else</span>&nbsp;<span class="hljs-keyword">if</span>&nbsp;(vip.getVipType().getCode()&nbsp;==&nbsp;VIPEnums.STAR.getCode())&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-comment">//&nbsp;星钻会员策略实现类</span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vipStrategy&nbsp;=&nbsp;<span class="hljs-keyword">new</span>&nbsp;StarVIPStrategyImpl();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;<span class="hljs-keyword">else</span>&nbsp;<span class="hljs-keyword">if</span>&nbsp;(vip.getVipType().getCode()&nbsp;==&nbsp;VIPEnums.SPORTS.getCode())&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-comment">//&nbsp;体育会员策略实现类</span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vipStrategy&nbsp;=&nbsp;<span class="hljs-keyword">new</span>&nbsp;SportsVIPStrategyImpl();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;<span class="hljs-keyword">else</span>&nbsp;<span class="hljs-keyword">if</span>&nbsp;(vip.getVipType().getCode()&nbsp;==&nbsp;VIPEnums.FUN_VIP.getCode())&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-comment">//&nbsp;FUN会员策略实现类</span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vipStrategy&nbsp;=&nbsp;<span class="hljs-keyword">new</span>&nbsp;FunVIPStrategyImpl();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;<span class="hljs-keyword">else</span>&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-comment">//&nbsp;其他会员...</span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-keyword">return</span>&nbsp;vipStrategy;<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br>}<br></code></pre>
        <p><strong>模拟会员登录获取权益</strong></p>
        <pre><code class="hljs java"><span class="hljs-comment">/**<br>&nbsp;*&nbsp;<span class="hljs-doctag">@author</span>:&nbsp;欢迎关注喂信公猪号：囧么肥事<br>&nbsp;*&nbsp;<span class="hljs-doctag">@date</span>:&nbsp;2021/12/16<br>&nbsp;*&nbsp;<span class="hljs-doctag">@email</span>:&nbsp;jiongmefeishi@163.com<br>&nbsp;*<br>&nbsp;*&nbsp;模拟会员登录获取权益<br>&nbsp;*/</span><br><span class="hljs-keyword">public</span>&nbsp;<span class="hljs-class"><span class="hljs-keyword">class</span>&nbsp;<span class="hljs-title">TestStrategy</span>&nbsp;</span>{<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-function"><span class="hljs-keyword">public</span>&nbsp;<span class="hljs-keyword">static</span>&nbsp;<span class="hljs-keyword">void</span>&nbsp;<span class="hljs-title">main</span><span class="hljs-params">(String[]&nbsp;args)</span>&nbsp;</span>{<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-comment">//&nbsp;黄金会员</span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VIP&nbsp;vip&nbsp;=&nbsp;<span class="hljs-keyword">new</span>&nbsp;VIP(VIPEnums.GOLD);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-comment">//&nbsp;策略上下文，执行者</span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VIPStrategyContext&nbsp;context&nbsp;=&nbsp;<span class="hljs-keyword">new</span>&nbsp;VIPStrategyContext();<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-comment">//&nbsp;根据会员类型，获取会员具体策略，获取黄金会员策略</span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VIPStrategy&nbsp;strategy&nbsp;=&nbsp;VIPStrategyFactory.getVipStrategy(vip);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-comment">//&nbsp;绑定给执行者</span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.setVipStrategy(strategy);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-comment">//&nbsp;执行黄金会员的策略，黄金权益</span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.handle();<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br>}<br></code></pre>
        <p>我们知道， 策略模式的本身设计出来的目的是封装一系列的算法，这些算法都具有共性，可以相互替换，算法独立于使用它的客户端独立变化，客户端不需要了解关注算法的具体实现，客户端仅仅依赖于策略接口 。</p>
        <p>通过使用策略模式和工厂模式结合，是不是感觉变得高大上起来了呢？😇</p>
        <p>当然了，最主要的是程序的扩展来说更方便了一些，更符合开闭原则，开放扩展，关闭修改。无论新增多少种新类型的会员，每个人只需要去继承策略接口，实现新会员应有的权益即可。</p>
        <p><strong>注意</strong>，虽然利于扩展，但是策略模式的缺点也很明显，策略工厂在创建具体的策略实现类的时候，还是书写大量的 if-else 去进行判断，如图 </p>
        <figure><img src="https://cdn.nlark.com/yuque/0/2021/png/10374809/1639657614062-cd0d9bd1-8149-462a-9b94-cd7f66d02a24.png?x-oss-process=image%2Fresize%2Cw_1314%2Climit_0" alt="缺点" title="缺点"><figcaption>缺点</figcaption></figure>
        <p>有小伙伴就说了这和不使用策略模式和工厂模式似乎差不多？？？</p>
        <p>抽出一个方法或者封装成一个对象去调用岂不是更简单？？？</p>
        <figure><img src="https://cdn.nlark.com/yuque/0/2021/png/10374809/1639657890219-73bfae2a-d90e-41e8-9f8b-e2252c21bb5f.png?x-oss-process=image%2Fresize%2Cw_1298%2Climit_0" alt="抽调" title="抽调"><figcaption>抽调</figcaption></figure>
        <p>接下来，我们就说说<strong>如何优化策略工厂</strong>。</p>
        <p>首先，我们的工厂，是根据当前传入的用户的会员类型，判断后，返回相应的策略实现类，那么可以借助集合来存储实现类，会员类型作为 key，将所有的会员策略都注册到 map 中。需要注意的是，日常开发基于Spring进行bean管理，上面需要创建的策略类，当然都是希望被 <strong>Spring 动态托管</strong>，而不是我们自己去一个个的new 出实例。</p>
        <p><strong>问题是，如何去实现策略类通过spring进行托管注册?</strong></p>
        <p>Spring种提供的<code>InitializingBean</code>接口，这个接口为Bean提供了属性初始化后的处理方法，它只包括<code>afterPropertiesSet</code>方法，凡是继承该接口的类，在<code>bean</code>的属性初始化后都会执行该方法。我们利用此方法把<code>Spring</code>通过<code>IOC</code>创建出来的Bean注册<code>Map</code>中。</p>
        <p><strong>改造策略工厂</strong></p>
        <pre><code class="hljs java"><span class="hljs-keyword">import</span>&nbsp;org.example.model.VIP;<br><span class="hljs-keyword">import</span>&nbsp;org.example.strategy.VIPStrategy;<br><br><span class="hljs-keyword">import</span>&nbsp;java.util.Map;<br><span class="hljs-keyword">import</span>&nbsp;java.util.concurrent.ConcurrentHashMap;<br><br><span class="hljs-comment">/**<br>&nbsp;*&nbsp;<span class="hljs-doctag">@author</span>:&nbsp;欢迎关注喂信公猪号：囧么肥事<br>&nbsp;*&nbsp;<span class="hljs-doctag">@date</span>:&nbsp;2021/12/16<br>&nbsp;*&nbsp;<span class="hljs-doctag">@email</span>:&nbsp;jiongmefeishi@163.com<br>&nbsp;*&nbsp;&lt;p&gt;<br>&nbsp;*&nbsp;VIP策略工厂<br>&nbsp;*/</span><br><span class="hljs-keyword">public</span>&nbsp;<span class="hljs-class"><span class="hljs-keyword">class</span>&nbsp;<span class="hljs-title">VIPStrategyFactory</span>&nbsp;</span>{<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-comment">//&nbsp;存储策略类实例</span><br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-keyword">public</span>&nbsp;<span class="hljs-keyword">static</span>&nbsp;Map&lt;Integer,&nbsp;VIPStrategy&gt;&nbsp;strategyMap&nbsp;=&nbsp;<span class="hljs-keyword">new</span>&nbsp;ConcurrentHashMap&lt;&gt;();<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-function"><span class="hljs-keyword">private</span>&nbsp;<span class="hljs-title">VIPStrategyFactory</span><span class="hljs-params">()</span>&nbsp;</span>{<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-function"><span class="hljs-keyword">public</span>&nbsp;<span class="hljs-keyword">static</span>&nbsp;VIPStrategy&nbsp;<span class="hljs-title">getVipStrategy</span><span class="hljs-params">(VIP&nbsp;vip)</span>&nbsp;</span>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-keyword">if</span>&nbsp;(vip&nbsp;==&nbsp;<span class="hljs-keyword">null</span>)&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-keyword">return</span>&nbsp;<span class="hljs-keyword">null</span>;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-keyword">return</span>&nbsp;strategyMap.get(vip.getVipType().getCode());<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br>}<br></code></pre>
        <p><strong>改造策略类</strong>，在bean属性初始化后，将实例对象注册到工厂类中的 map</p>
        <p>以黄金会员为例：</p>
        <pre><code class="hljs java"><span class="hljs-keyword">import</span>&nbsp;org.example.factory.VIPStrategyFactory;<br><span class="hljs-keyword">import</span>&nbsp;org.example.model.VIPEnums;<br><span class="hljs-keyword">import</span>&nbsp;org.example.strategy.VIPStrategy;<br><span class="hljs-keyword">import</span>&nbsp;org.springframework.beans.factory.InitializingBean;<br><span class="hljs-keyword">import</span>&nbsp;org.springframework.stereotype.Service;<br><br><span class="hljs-comment">/**<br>&nbsp;*&nbsp;<span class="hljs-doctag">@author</span>:&nbsp;欢迎关注喂信公猪号：囧么肥事<br>&nbsp;*&nbsp;<span class="hljs-doctag">@date</span>:&nbsp;2021/12/16<br>&nbsp;*&nbsp;<span class="hljs-doctag">@email</span>:&nbsp;jiongmefeishi@163.com<br>&nbsp;*<br>&nbsp;*&nbsp;策略接口具体实现类-黄金会员<br>&nbsp;*/</span><br><span class="hljs-meta">@Service</span><br><span class="hljs-keyword">public</span>&nbsp;<span class="hljs-class"><span class="hljs-keyword">class</span>&nbsp;<span class="hljs-title">GoldVIPStrategyImpl</span>&nbsp;<span class="hljs-keyword">implements</span>&nbsp;<span class="hljs-title">VIPStrategy</span>,&nbsp;<span class="hljs-title">InitializingBean</span>&nbsp;</span>{<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-meta">@Override</span><br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-function"><span class="hljs-keyword">public</span>&nbsp;<span class="hljs-keyword">void</span>&nbsp;<span class="hljs-title">equity</span><span class="hljs-params">()</span>&nbsp;</span>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-comment">//&nbsp;TODO&nbsp;黄金会员具备的具体权益</span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.out.println(<span class="hljs-string">"黄金会员具备的具体权益"</span>);<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-meta">@Override</span><br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="hljs-function"><span class="hljs-keyword">public</span>&nbsp;<span class="hljs-keyword">void</span>&nbsp;<span class="hljs-title">afterPropertiesSet</span><span class="hljs-params">()</span>&nbsp;<span class="hljs-keyword">throws</span>&nbsp;Exception&nbsp;</span>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VIPStrategyFactory.strategyMap.put(VIPEnums.GOLD.getCode(),&nbsp;<span class="hljs-keyword">new</span>&nbsp;GoldVIPStrategyImpl());<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br>}<br></code></pre>
        <p>通过策略模式、工厂模式以及Spring的<code>InitializingBean</code>接口，算是解决了大量的if else，后续新VIP出现也更容易扩展，当然了，这里只是对于设计模式思想的一个简单的示例，实际应用开发中，还是要根据具体的业务场景灵活变通。有需要的小伙伴也可以自己手动模拟一些场景，比如奶茶店各种奶茶新品等等。如果想用囧囧的示例，可公猪号上回复220110 自行导入示例运行即可。</p>
        <p>注意：学习软件设计原则，千万不能形成强迫症。当碰到业务复杂的场景时，需要随机应变。</p>
        <p>学习设计原则是学习设计模式的基础。在实际开发过程中，并不是一定要求所有代码都遵循设计原则，而是要综合考虑人力、时间、成本、质量，不刻意追求完美，要在适当的场景遵循设计原则。这体现的是一种平衡取舍，可以帮助我们设计出更加优雅的代码结构。</p>
        <p><strong>设计模式其实也是一门艺术。设计模式源于生活，不要为了套用设计模式而使用设计模式。</strong></p>
        <figure><img src="https://img-blog.csdnimg.cn/img_convert/ffa4e69bc51e8e8ac20e6ad189887497.gif" alt="img" title="img"><figcaption>img</figcaption></figure>
        <p>喜欢的小伙伴，欢迎点赞收藏关注</p>
        <figure><img src="https://mmbiz.qpic.cn/mmbiz_png/2GfhQ2H7oTH4MWyq9zq3JibfFP3VKDn6EewpW7fmTMuKbK08XzpZrdVS2JYu3an0ynicFcAMt0TAmnJMN4w3IpRQ/640?wx_fmt=png&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" alt="3" title="3"><figcaption>3</figcaption></figure></div>
    <!--content E-->
</div>



</body>
<!--left bar tools js S-->
<script src="http://www.jq22.com/jquery/jquery-1.10.2.js"></script>
<script type="text/javascript" src="../../static/js/nav.js"></script>
<!--left bar tools js E-->

<!-- 滚动条 S -->
<script type="text/javascript" src="../../static/js/optiscroll.js"></script>
<!-- 滚动条 E -->

<!--commonjs S-->
<script type="text/javascript" src="../../static/js/common.js"></script>
<!--commonjs E-->

</html>
